﻿using System;
using System.Collections.Generic;
using JinianNet.JNCms.Models;

namespace JinianNet.JNCms.Data
{
    public interface IArticle
    {
        /// <summary>
        /// 添加
        /// </summary>
        int Insert(Article model);
        /// <summary>
        /// 修改附件所属类型与关联ID
        /// </summary>
        int Update(Article model);
        /// <summary>
        /// 删除
        /// </summary>
        int Delete(int id);
        /// <summary>
        /// 根据关联ID与类型取所有附件
        /// </summary>
        List<Article> GetList(int id, int pageIndex,int pageSize);
        /// <summary>
        /// 根据附件编号获取详情
        /// </summary>
        Article GetItem(string item);

        void Click(int id);

    }
    public partial class DataAccess
    {
        public static IArticle CreateArticle()
        {
            return (IArticle)CreateObject(".Article");
        }
    }
}
